module.exports = (app) => {
  const { Schema, createModel, getModelName, formatDate, pre } = app.jax.mongoose
  const modelName = getModelName(__filename)

  const schema = new Schema({
    type: String,
    count: { type: Number, default: 1 }, // 计次
    deviceId: String,
    docId: Schema.Types.ObjectId, // 关联文档ID
    sourceId: String, // 设备标识（MAC、用户ID，SessionId皆可)
  })

  const Model = createModel(modelName, schema)

  return Model
}
